import request from '@/utils/request'

// 获取用户信用分
export function getUserCreditScore() {
  return request({
    url: '/api/credit/score',
    method: 'get'
  })
}

// 获取信用等级
export function getCreditLevel() {
  return request({
    url: '/api/credit/level',
    method: 'get'
  })
}

// 获取信用特权
export function getCreditBenefits() {
  return request({
    url: '/api/credit/benefits',
    method: 'get'
  })
}

// 获取信用记录
export function getCreditHistory(params) {
  return request({
    url: '/api/credit/history',
    method: 'get',
    params
  })
}

// 获取信用提升建议
export function getCreditImprovementTips() {
  return request({
    url: '/api/credit/improvement-tips',
    method: 'get'
  })
}

// 获取信用分变动记录
export function getCreditScoreChanges(params) {
  return request({
    url: '/api/credit/score-changes',
    method: 'get',
    params
  })
}

// 获取信用分预测
export function getCreditScorePrediction() {
  return request({
    url: '/api/credit/score-prediction',
    method: 'get'
  })
}

// 获取信用分影响因素
export function getCreditScoreFactors() {
  return request({
    url: '/api/credit/score-factors',
    method: 'get'
  })
}

// 获取信用分提升任务
export function getCreditScoreTasks() {
  return request({
    url: '/api/credit/score-tasks',
    method: 'get'
  })
}

// 提交信用分提升任务
export function submitCreditScoreTask(taskId) {
  return request({
    url: `/api/credit/score-tasks/${taskId}/submit`,
    method: 'post'
  })
}

// 获取信用分等级特权
export function getCreditLevelPrivileges() {
  return request({
    url: '/api/credit/level-privileges',
    method: 'get'
  })
}

// 获取信用分等级权益
export function getCreditLevelBenefits() {
  return request({
    url: '/api/credit/level-benefits',
    method: 'get'
  })
}

// 获取信用分等级规则
export function getCreditLevelRules() {
  return request({
    url: '/api/credit/level-rules',
    method: 'get'
  })
}

// 获取信用分等级说明
export function getCreditLevelDescription() {
  return request({
    url: '/api/credit/level-description',
    method: 'get'
  })
}

// 获取信用分等级图标
export function getCreditLevelIcons() {
  return request({
    url: '/api/credit/level-icons',
    method: 'get'
  })
}

// 获取信用分等级颜色
export function getCreditLevelColors() {
  return request({
    url: '/api/credit/level-colors',
    method: 'get'
  })
}

// 获取信用分等级标签
export function getCreditLevelTags() {
  return request({
    url: '/api/credit/level-tags',
    method: 'get'
  })
}

// 获取信用分等级徽章
export function getCreditLevelBadges() {
  return request({
    url: '/api/credit/level-badges',
    method: 'get'
  })
}

// 获取信用分等级特权说明
export function getCreditLevelPrivilegeDescription() {
  return request({
    url: '/api/credit/level-privilege-description',
    method: 'get'
  })
}

// 获取信用分等级权益说明
export function getCreditLevelBenefitDescription() {
  return request({
    url: '/api/credit/level-benefit-description',
    method: 'get'
  })
}

// 获取信用分等级规则说明
export function getCreditLevelRuleDescription() {
  return request({
    url: '/api/credit/level-rule-description',
    method: 'get'
  })
}

// 获取信用分等级特权图标
export function getCreditLevelPrivilegeIcons() {
  return request({
    url: '/api/credit/level-privilege-icons',
    method: 'get'
  })
}

// 获取信用分等级权益图标
export function getCreditLevelBenefitIcons() {
  return request({
    url: '/api/credit/level-benefit-icons',
    method: 'get'
  })
}

// 获取信用分等级规则图标
export function getCreditLevelRuleIcons() {
  return request({
    url: '/api/credit/level-rule-icons',
    method: 'get'
  })
} 